from copy import deepcopy

if __name__ == "__main__":
    for number in range(100, 1000):
        _number = deepcopy(number)
        new_number = 0
        for i in [2, 1]:
            _new_number, _number = divmod(_number, pow(10, i))
            new_number += pow(_new_number, 3)
        if new_number + pow(_number, 3) == number:
            print(number)